﻿<%@ Page Language="C#" AutoEventWireup="true" EnableEventValidation = "false" MasterPageFile="~/MasterPage.master"
    Inherits="Customer_Product_List_Customer" CodeFile="Customer_Product_List_Customer.aspx.cs" %>
  <%@ Register Src="~/UserControl/GridPager.ascx" TagName="GridPager"  TagPrefix="uc1" %>
    
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>分销列表客户维护</title>

    <script src="../JavaScript/empchecks.js" type="text/javascript"></script>

    <script language="javascript" type="text/javascript">
    function CheckList(ckb,lbl,newName)
    {
        var ckbSelect=document.getElementById(ckb);
        var lblName=document.getElementById(lbl);
        if(ckbSelect.checked)
        {
            if(lblName.innerText.length>0&&lblName.innerText!=newName)
            {
                if(!confirm('是否覆盖现有客户分销列表?'))
                {
                    ckbSelect.checked=false;
                }
            }
        }
    }
    

    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div>
        <table id="wsd_inputtable">
            <tr>
                <td width="100%" class="tabletitle" colspan="6">
                    <asp:Literal ID="Literal3" runat="server" Text="<%$resources:language,lbl_Query_Condition %>"></asp:Literal>
                </td>
            </tr>
            <tr>
               <%-- <td class="tablefield">
                   <asp:Literal ID="Literal4" runat="server" Text="<%$resources:language,lbl_CustomerType %>"></asp:Literal>
                </td>
                <td nowrap="nowrap">
                    <asp:DropDownList runat="server" ID="ddlClass" Width="130">
                    </asp:DropDownList>
                </td>--%>
                <td class="tablefield">
                    <asp:Literal ID="Literal5" runat="server" Text="<%$resources:language,lbl_SalesChannel %>"></asp:Literal>
                </td>
                <td nowrap="nowrap">
                    <asp:DropDownList runat="server" ID="ddlChannel" Width="130">
                    </asp:DropDownList>
                </td>
                <td class="tablefield">
                    <asp:Literal ID="Literal6" runat="server" Text="<%$resources:language,lbl_CompanyName %>"></asp:Literal>
                </td>
                <td nowrap="nowrap">
                    <asp:DropDownList runat="server" ID="ddlChain" Width="130">
                    </asp:DropDownList>
                </td>
                <td class="tablefield">
                    <asp:Literal ID="Literal10" runat="server" Text="<%$resources:language,lbl_CustomerCodeOrName %>"></asp:Literal>
                    </td>
                <td nowrap="nowrap">
                    <asp:TextBox runat="server" ID="txtCustomer" MaxLength="20" Width="150px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="tablefield">
                    <asp:Literal ID="Literal7" runat="server" Text="<%$resources:language,lbl_DistributionType %>"></asp:Literal>
                </td>
                <td nowrap="nowrap">
                    <asp:DropDownList runat="server" ID="ddlSelected" Width="130">
                        <asp:ListItem Text="<%$resources:language,ddl_All %>" Value="0"></asp:ListItem>
                        <asp:ListItem Text="<%$resources:language,ddl_Dispatched %>" Value="1"></asp:ListItem>
                        <asp:ListItem Text="<%$resources:language,ddl_NoDispatch %>" Value="2"></asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td class="tablefield">
                    <asp:Literal ID="Literal9" runat="server" Text="<%$resources:language,lbl_RegionalLevel %>"></asp:Literal>
                </td>
                <td nowrap="nowrap" colspan="3">
                    <asp:DropDownList runat="server" ID="ddlLevel" Width="130">
                    </asp:DropDownList>
                </td>                
            </tr>
            <tr>
                <td class="buttonarea" colspan="6" style=" padding-right:8%">                    
                    <asp:Button ID="btnQuery" runat="server" class="wsd_button2" Text="查 询" OnClick="btnQuery_Click" />
                    &nbsp;&nbsp;
                    <input  type="button" class="wsd_button2" size="47" runat="server" value="重 置" name="reset" onclick="clearForm('form1')"/>
                    <asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="True" 
                        oncheckedchanged="CheckBox1_CheckedChanged" Visible="False" />
                </td>
            </tr>
        </table>
        <br />
        <table id="wsd_inputtable">
            <tr>
                <td class="tabletitle">
                    <asp:Literal ID="Literal11" runat="server" Text="<%$resources:language,lbl_CustomerList %>"></asp:Literal>
                     <asp:Literal ID="Literal12" runat="server" Text="<%$resources:language,lbl_CustomerDistributionList %>"></asp:Literal>
                     :<asp:Label runat="server" ID="lblListName"></asp:Label>
                </td>
                <td class="tabletitle">
                 
                </td>
            </tr>
        </table>
        <table id="wsd_listtable" width="100%">
            <tr>
                <td style="width: 100%">
                    <asp:GridView BorderWidth="0" Width="100%" ID="GridView1" runat="server" AutoGenerateColumns="false"
                        EmptyDataText="<%$resources:language,lbl_Empty %>" EmptyDataRowStyle-Font-Bold="true" EmptyDataRowStyle-HorizontalAlign="Center"
                        EnableEmptyContentRender="true" 
                        OnRowDataBound="gvChannelType_RowDataBound" AllowPaging="True" 
                        PageSize="50" onpageindexchanging="GridView1_PageIndexChanging"  >
                        <HeaderStyle CssClass="titlist" />

<EmptyDataRowStyle HorizontalAlign="Center" Font-Bold="True"></EmptyDataRowStyle>
                        <Columns>
                            <asp:TemplateField HeaderText="系统ID" Visible="false">
                                <ItemTemplate>
                                    <asp:Label runat="server" ID="lblID" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField HeaderText="<%$resources:language,lbl_CustomerCode %>" DataField="CODE" />
                            <asp:BoundField HeaderText="<%$resources:language,lbl_CustomerName %>" DataField="NAME" />
                            <asp:BoundField HeaderText="<%$resources:language,lbl_Address %>" DataField="ADDRESS_LINE" />
                            <asp:BoundField HeaderText="<%$resources:language,lbl_CompanyName %>" DataField="Chain" Visible="false" />
                            <asp:BoundField HeaderText="<%$resources:language,lbl_ChainStore %>" DataField="Banner" Visible="false" />
                            <%--<asp:BoundField HeaderText="<%$resources:language,lbl_CustomerType %>" DataField="CustomerClass" />--%>
                            <asp:BoundField HeaderText="<%$resources:language,lbl_SalesChannel %>" DataField="Channel" />
                            <asp:BoundField HeaderText="<%$resources:language,lbl_Tel %>" DataField="TELEPHONE" />
                           <%-- <asp:BoundField HeaderText="<%$resources:language,lbl_Fax %>" DataField="FAX"  />--%>
                            <asp:TemplateField HeaderText="<%$resources:language,lbl_CustomerDistributionList %>">
                                <ItemTemplate>
                                    <asp:Label runat="server" ID="lblListName" Text='<% #Eval("CUSTOMER_PRODUCT_NAME") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="全选">
                                <HeaderTemplate>
                                    <asp:checkbox  id="chkAll"   runat="server"  AutoPostBack=true OnCheckedChanged ="SelectALL" />
                                    <asp:Literal ID="Literal11" runat="server" Text="<%$resources:language,lbl_Include %>"></asp:Literal>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="cbxSelected" runat="server" Checked='<%# Convert.ToBoolean(Eval("Selected")) %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <PagerSettings Visible="false" />
                        <RowStyle CssClass="evenline" />
                        <AlternatingRowStyle CssClass="oddline" />
                    </asp:GridView>
                     <uc1:GridPager ID="GridPager1" runat="server" Visible="false"  />
                </td>
            </tr>
        </table>
        <br />
        <table id="wsd_inputtable">
            <tr>
                <td width="100%" class="tabletitle" >
                     <asp:Literal ID="Literal40" runat="server" Text="<%$resources:language,lbl_Operation_Area %>"></asp:Literal>
                </td>
            </tr>
            <tr>
                <td class="buttonarea">
                    <asp:Button ID="btnSubmiet" runat="server" class="wsd_button2" Text="<%$resources:language,btn_Save %>" OnClick="btnSubmit_Click" />&nbsp;&nbsp;
                  <input class="wsd_button2" onclick="location.href='Customer_Product_List.aspx'" 
                   runat="server" type="button" value="<%$resources:language,btn_Cancel %>" />
                    
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
